import { ORDER1BaseService } from './order1-base.service';

/**
 * 订单服务
 *
 * @export
 * @class ORDER1Service
 * @extends {ORDER1BaseService}
 */
export class ORDER1Service extends ORDER1BaseService {
    /**
     * Creates an instance of ORDER1Service.
     * @memberof ORDER1Service
     */
    constructor(opts?: any) {
        const { context: context, tag: cacheKey } = opts;
        super(context);
        if (___ibz___.sc.has(cacheKey)) {
            return ___ibz___.sc.get(cacheKey);
        }
        ___ibz___.sc.set(cacheKey, this);
    }

    /**
     * 获取实例
     *
     * @static
     * @param 应用上下文
     * @return {*}  {ORDER1Service}
     * @memberof ORDER1Service
     */
    static getInstance(context?: any): ORDER1Service {
        const cacheKey: string = context?.srfdynainstid ? `${context.srfdynainstid}ORDER1Service` : `ORDER1Service`;
        if (!___ibz___.sc.has(cacheKey)) {
            new ORDER1Service({ context: context, tag: cacheKey });
        }
        return ___ibz___.sc.get(cacheKey);
    }
}
export default ORDER1Service;
